-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updateAttributes: update current node only #5154
Conversation
There is a bug (?) in updateAttributes, attributes of the node are updated but also all it's parent nodes of the same type. This is problematic with things like nested lists, but also nested paragraphs, etc The fix updates attributes of the node ("last") only and leaves the parents intact
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Appreciate your contribution @silenius but it looks like we need some tests & lint rules resolved for this to be merged |
Sorry, I pressed the wrong button (: |
I don't think that is correct either. You were right to pull in the changes from main, it is your changes that are failing the build |
I've fixed the lint issue, but I have no idea why it times out in one test..? (unfortunately Cypress is not supported on my OS, FreeBSD, so I can't check at the moment) |
@silenius if you run the project locally This is also seen on the netlify deployment: https://deploy-preview-5154--tiptap-embed.netlify.app/src/extensions/textalign/react/ So your change broke the ability to center text with the text align extension somehow Hope this helps @silenius |
thanks, it should be fixed :) |
This reverts commit 359b309.
Appreciate your contribution here, it will go into the next release. Might take a while, so I will make a beta that includes it soon |
Hi, I think this change caused the following problem: #5254 |
Thanks for your feedback. I will write a test for this & see if I can resolve it or revert it |
Sorry @silenius I did not get around to handling this. If you have an idea on how to support this, that would very much be appreciated. I'm trying to get this new release out and so I had to revert it |
Hi @nperez0111, Sorry for breakage, I'll try to find a little bit of time to review it.. but it could be reverted in the meantime |
Thanks for your contribution in the first place! |
FYI I've reworked this in #5738 |
There is a bug (?) in updateAttributes, attributes of the node are updated but also all it's parent nodes of the same type. This is problematic with things like nested lists, but also nested paragraphs, etc
The fix updates attributes of the node ("last") only and leaves the parents intact
Changes Overview
updateAttributes update node only (and not its parents)
Implementation Approach
adapt updateAttributes so that it keep tracks of the "last" (current) node
Testing Done
tested locally with bulletList nodes
Verification Steps
try to update an attributes of a nested list for examplectionality of your changes. -->
Checklist
feat: Implement new feature
orchore(deps): Update dependencies
)Related Issues
#3545 #4466